package com.bidianying.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.bidianying.service.TaobaoService;


@Component 
public class TaobaoTask {
	
	@Autowired
	private TaobaoService taobaoService;
	
	//初始化淘宝电影的影院
	@Scheduled(cron = "0 43 09 * * ?") 
    public void job1() {
		System.out.println("taoabo定时器job1---start---");
		//taobaoService.saveTaobaoCinemaInfo();
		System.out.println("taoabo定时器job1---end---");
	}
	//初始化淘宝的影片
	@Scheduled(cron = "0 52 14 * * ?") 
    public void job2() {
		System.out.println("taoabo定时器job2---start---");
		taobaoService.saveTaobaoMovieInfo();
		System.out.println("taoabo定时器job2---end---");
	}
	
	
}
